package com.awonsome.admin.api;

import com.awonsome.admin.api.dto.UserAuthDTO;
import com.awonsome.admin.api.fallback.UserFeignFallbackClient;
import com.awonsome.common.core.result.Result;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;

/**
 * @author yangdejun
 * @date 2022/1/23 12:28
 */
@FeignClient(value = "mall-admin", fallback = UserFeignFallbackClient.class)
public interface UserFeignClient {

    @GetMapping(value = "/api/v1/users/username/{username}")
    Result<UserAuthDTO> getUserByUsername(@PathVariable String username);

}
